import {createWebHistory,createRouter, RouteRecordRaw} from 'vue-router'

const routes: RouteRecordRaw[]=[
    {
        path:'/',
        redirect:'/login'
    },
    {
        path:'/login',
        component:()=>import('@/components/login.vue')
    },
    {
        path:'/register',
        component:()=>import('@/components/register.vue')
    },
    {
        path:'/home',
        component:()=>import('@/components/home.vue'),
        children:[

        ]
    },
    {
        path:"/:pathMatch(.*)",
        component:()=>import('@/components/notfound.vue')
    }
]

const router=createRouter({
    history:createWebHistory(process.env.BASE_URL),
    routes
})
export default router